export function isValidJSON(str: string) {
  try {
    JSON.parse(str)
  } catch (e) {
    return false
  }
  return true
}

export function isObject(value: any) {
  return value && typeof value === 'object' && value.constructor === Object
}
